// app交互
const connectWebViewJavascriptBridge = callback => {
  if (!window.WebViewJavascriptBridge) {
    document.addEventListener(
      'WebViewJavascriptBridgeReady',
      function() {
        callback(window.WebViewJavascriptBridge)
      },
      false
    )
  } else {
    return callback(window.WebViewJavascriptBridge)
  }
}

export { connectWebViewJavascriptBridge }
